Clover coverage report - Enterprise Web Services - 1.0
Coverage timestamp: Mon May 30 2005 17:10:32 CEST
file stats: LOC: 55   Methods: 2
NCLOC: 32   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
J2EEContainerSpecificDDGenerator.java 25% 50% 100% 45%
coverage coverage
 1   
 /*
 2   
  * Copyright 2001-2004 The Apache Software Foundation.
 3   
  * 
 4   
  * Licensed under the Apache License, Version 2.0 (the "License");
 5   
  * you may not use this file except in compliance with the License.
 6   
  * You may obtain a copy of the License at
 7   
  * 
 8   
  *      http://www.apache.org/licenses/LICENSE-2.0
 9   
  * 
 10   
  * Unless required by applicable law or agreed to in writing, software
 11   
  * distributed under the License is distributed on an "AS IS" BASIS,
 12   
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13   
  * See the License for the specific language governing permissions and
 14   
  * limitations under the License.
 15   
  */
 16   
 package org.apache.geronimo.ews.ws4j2ee.toWs.dd;
 17   
 
 18   
 import org.apache.commons.logging.Log;
 19   
 import org.apache.commons.logging.LogFactory;
 20   
 import org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext;
 21   
 import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationConstants;
 22   
 import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault;
 23   
 import org.apache.geronimo.ews.ws4j2ee.toWs.Generator;
 24   
 import org.apache.geronimo.ews.ws4j2ee.toWs.Writer;
 25   
 import org.apache.geronimo.ews.ws4j2ee.toWs.dd.geronimo.GeronimoDDWriter;
 26   
 import org.apache.geronimo.ews.ws4j2ee.toWs.dd.jboss.JBossDDWriter;
 27   
 import org.apache.geronimo.ews.ws4j2ee.toWs.dd.jonas.JOnASDDWriter;
 28   
 
 29   
 /**
 30   
  * @author Srinath perera(hemapani@opesnource.lk)
 31   
  */
 32   
 public class J2EEContainerSpecificDDGenerator implements Generator {
 33   
     private J2EEWebServiceContext j2eewscontext;
 34   
     private Writer writer;
 35   
     protected static Log log =
 36   
             LogFactory.getLog(JaxrpcMapperGenerator.class.getName());
 37   
 
 38  8
     public J2EEContainerSpecificDDGenerator(J2EEWebServiceContext j2eewscontext) throws GenerationFault {
 39  8
         this.j2eewscontext = j2eewscontext;
 40  8
         if (GenerationConstants.JBOSS_CONTAINER.equals(j2eewscontext.getMiscInfo().getTargetJ2EEContainer()))
 41  8
             writer = new JBossDDWriter(j2eewscontext);
 42  0
         else if (GenerationConstants.JONAS_CONTAINER.equals(j2eewscontext.getMiscInfo().getTargetJ2EEContainer()))
 43  0
             writer = new JOnASDDWriter(j2eewscontext);
 44  0
         else if (GenerationConstants.GERONIMO_CONTAINER.equals(j2eewscontext.getMiscInfo().getTargetJ2EEContainer()))
 45  0
             writer = new GeronimoDDWriter(j2eewscontext);
 46   
         else
 47  0
             new GenerationFault("unsupported j2ee container " + j2eewscontext.getMiscInfo().getTargetJ2EEContainer());
 48   
     }
 49   
 
 50  8
     public void generate() throws GenerationFault {
 51  8
         if (writer != null)
 52  8
             writer.write();
 53   
     }
 54   
 }
 55